![]() |
KGI (Kierra Game Interpreter) © 2005, 2006 Josh Lauber
|
|
|
|
Website: http://www.geocities.com/kierragamers Forum: http://www.kierragames.proboards67.com
|
|
|
This program is free software; you can redistribute it and/or modify |
||
| KGI uses QMIDI for sound support. It has been included with the source unaltered.
|
||
|
1. System Requirements
Minimum: 640k Memory (Programs may use less, but you need memory
for drivers such as Sound/Mouse/etc.) (Having XMS loaded may help free RAM
but is not required) Sound Blaster or Compatible Sound Card (Game Engine only) (1.0, 2.0, Pro, pro 2, AWE, 16, etc.) (If running in pure DOS, the drivers must be loaded) Recommended: VGA/MCGA graphics or higher (Required for Editors) Mouse (Required for certain Editors) Note: I have tested KGI on Windows 98, and Windows XP. It works fine on both, but on XP you must use the Wavetable /3 switch on sbmidi. If you have anything like vdmsound, do not load it when running KGI. This will conflict with the sound blaster drivers. Throughout this document, a file called KGI.BAT will be mentioned. If you have Win XP use KGIXP.BAT instead. |
||
|
2. Overview of KGI resources Monster Images(*.kmi)- These 38x48 16 color bitmaps are used by KGI for images of monsters during battle. They are static just like tiles. Each image is exactly 1,836 bytes (1.79 KB) Note: Since KGI was written for 16-bit DOS, all filenames must have no more than eight characters, a period, then a three letter extension, just like all file names before Windows 95. For an example: abcdefgh.ext. If the file name is too long, you will have to right click on the file in Windows Explorer and select its properties. In the Properties window there will be a label called MS-DOS name. That is the name the file goes by in DOS. For an example if you had kgi_tile-grass.ktl, then the MS-DOS filename will be KGI_TI~1.KTL. Windows XP doesn’t have MS-DOS filenames so just keep the filenames no more than eight characters.
|
|
|
|
3. Overview of KGI Utilities * All the editors will require VGA, or MCGA. Only the engine (KGI.EXE) supports EGA *
BSV2KMI.EXE- This utility allows you to convert QB bsaved images to KGI's monster images. This is really useful if you wanted to use some other program to draw the games graphic images. However there are certain requirements for a bsaved image. It must use SCREEN 13 and have only the first sixteen colors of the DOS palette. Also when converting an Bsaved image to a monster image be sure it has the dimensions of 38x48 or the image will be clipped. BSV2KSP.EXE- Just like BSV2KMI, this program converts bsaved images into KGI sprite files. Be sure the dimensions are 16x16 and remember that color 0 (Black) is the transparent color. The same rules apply to the bsaved images. BSV2KTL.EXE- This program converts bsaved images into KGI tiles. Just like sprites be sure the dimensions are 16x16. The same rules apply to the bsaved images. Note: A program called BSVBABEL can convert 256 or less colored bitmaps into Bsaved images. With this you can draw your images in programs like Paint Shop Pro or some other Windows Paint Program. When converting be sure to have the palette set to Qbasic's Screen 13 palette. When drawing your bitmap for images be sure to use the DOS 16 colors and the dimensions match those of the image (16x16, or 38x48). Included with KGI are two bitmap images. One called 16c_tile.bmp and one called 16c_mon.bmp. These can be used in your paint program to draw your images because the dimensions are already set and so is the palette. Just be sure to save it as 16 colors with the palette specified using Save As. 16c_tile.bmp is 16x16 for tiles and sprites. 16c_mon.bmp is 38x48 for monster images. You can find BSVBABEL at http://www.trelsoft.tk KGIEDIT.EXE- This program is used to create the GAME.KGI file. When you run it, it will check to see if a game.kgi exists and a tile.lst. If it can't find one it will tell you and will be prompted to answer its questions so it can create one. You can make any changes to the tile.lst file by opening it up in an ASCII text editor; however to make changes to the game.kgi file, you must delete it and retype it again. It is strongly recommended to record all the data from the GAME.KGI file should disaster fall or if you need to make a change. KGIVIEW.EXE- This program will open up the GAME.KGI file and allow you to preview it by display its contents. MAPEDIT.EXE- This is the map editor, where you can create maps and set up actions, warps, enemy appearance, etc. This uses VGA's Screen 12 (640x480 16 color display) KGIMAIN.EXE- This useful program works great for those who are new to KGI. When you run it, it asks for a number or letter representing a program. When you press one, KGIMAIN will execute the program. When the program is finished, DOS will return back to KGIMAIN.
|
||
|
The Game Engine is the program called KGI.EXE. Run this when you want to run your game. Remember the drivers SBMIDI and SBSIM must be loaded. If you are running in pure DOS you may want to free up RAM after running KGI. To do so just type the following:
sbsim /u Always make sure SBSIM is unloaded first. When you start up the game engine, it will display the splash screen. Next it will read the GAME.KGI and the TILE.LST files. Afterwards it will load all the tiles and the sprite then display the game title screen. When you start the game it will go to the options menu. Here you can Start a New Game, Restore an Old Game, or Quit the Game. When you start a new game, it will ask you to enter your name. Once the game has started, you can move on the map by using the arrow keys. Pressing F1 will give you the game controls. F3 will toggle the debug mode which displays the players X and Y coordinates and tell you on how much RAM is free. F5 will Save your game into a file. Save games store the KGI version, the game's version data such as the name, the author, the version, and the copyright year, and all of the player's data. Save game files use the extension *.KSV. When you are prompted to save or load a game, you will see a file called TEMP.KSV. NEVER save over that file or load it. This is a temporary file which is created during game play and deleted afterwards. F6 will display your status which displays your stats, name, equipment, etc. F7 will Load a previous save game. When you load a game, KGI will check if the Game Engine version is correct, then it will compare the game's data which includes the title, author, version, and copyright. If they don't match, then the save game was saved with a different game and is invalid. After KGI finds that it is an authentic save file, it will then load it. ESC will quit the game. When in the Quit Menu Press Enter to confirm to quit. Press ESC again to continue playing. TAB or CTRL-I will display the inventory. This lists the items the player is carrying and the quantity. Use the arrow keys to select an item to use and press Enter to use it. This screen also displays on how much money you're carrying. Press ESC to exit this Screen. Pressing Enter on the map will perform the ACTION button. This is similar to Pressing the A button on Nintendo game consoles. This can be used to talk to people, open a chest, read a sign, etc.
The KGI DEMO GAME is a sample game that is used to demonstrate what KGI can do. It is a separate download on our site because it can be updated at different times than with new KGI versions. At the time of writing (August 1, 2006), the DEMO GAME is not available yet. If you check our site out in the next few weeks, it should be up soon. |
||
|
The following is a Tutorial that will teach you on how to create a KGI game. If you follow along, this will teach you the basics of KGI and hopefully it will make it seem less confusing. First thing you'll want to do is to create a folder for your game to be placed in. Remember your folders path and be sure that all folders to the path are eight characters or less. Next in the KGI directory run KGIMAIN. This will make it a lot easier than copying a bunch of files by hand. In the menu, select the first option - 1) Start a New Game. Press 1 on the keyboard and enter the path of your new game. KGIMAIN will now copy all the necessary files into your directory. When it is done close KGIMAIN and open up your game directory with your newly copied files. |
||
|
The first thing you should do once you have all of your files copied is to create your game.kgi file. You can do this by running KGIMAIN and select choice number 5) Create Game.KGI and Tile.lst, or run KGIEDIT. Please note that KGIEDIT is a little buggy when checking files. It will tell you that the tile.lst does not exist and begin asking you for tiles to be used. Ignore this for now by pressing enter through each tile. Once it has ended asking about the tile.lst, it may give an error and quit. Re run if it happens and it will begin asking you questions for the game.kgi. First enter the name of your game. After you've typed that enter the author of the game (that would be you of course). KGIEDIT will then ask you for a version string, for the game's version, and then a year string (copyright). After you have entered the game's data it will request you for the starting X and Y coordinates for the player. Oh...I almost forgot. Be sure that while you are entering this data to be writing it down just in case if you needed to retype this data in. Next you will be prompted to enter the player's stats for the varying levels. These include the following stats of each of the ten levels: Max Health- The maximum amount of health the player can have. When the player's health reaches 0 they die. Strength- The physical ability to inflict damage Agility- The ability to attack more quickly Vitality- The ability to withstand attacks (It is sometimes called Guard) Experience- The amount of experience points needed to reach the next level. You earn experience after defeating monsters. You don't set an experience requirement on level 10 as it is the last level. Note: KGI refers the player as the name called Ego. After you have entered the player's stats KGIEDIT will request you for the name of the currency. The currency name appears after the amount of money the player has in the inventory menu. Examples of currency could be Gold Coins, Silver Coins, Gald, Gil, Dollars, Rupees, etc. Now it is time for the items. Your game can have the total amount of 6 items and the maximum quantity the item can have is six, which means the player can only carrying six items of the same type at a time. After you entered the item's name (which is limited to 12 characters.) Then you'll be able to enter the item type. As of right now, you can only have two types. One being an item that is used to heal 30 Health Points to the player, the other is for an ordinary item that doesn't do anything. Once you entered the data for items, you will need to enter the game's equipment. You'll start with the weapons, then the armor, and then shields. (Just to remind you...be sure to copy all this down on a sheet of paper. You might need it again.) You can have up to 5 of each equipment type. Starting with weapons enter the name of each and the attack power bonus. The player's attack = the player's strength + the current weapon's attack power bonus. The player's attack is how much damage the player can inflict upon the enemy. Armor and Shields have a defense power bonus. The player's defense = the player's vitality + the current armor's defense power bonus + the current shield's defense power bonus. The player's defense is how much damage they'll be able to resist from the enemy. The name's of each equipment is limited to 12 characters. Note: If you want less than 6 items, weapons, or armor types, You can just hit Enter after you type in all the weapons, armor, items, you want. Finally you must enter the stats for monsters. One KGI game can have up to 10 monsters. Each monster has the following stats: Name- The name of the monster Health- Once it reaches 0, the player defeats the monster. Attack- The amount of damage the monster can inflict on the player (Without resistance from defense) Defense- The amount of damage the monster can resist. Agility- The amount of speed. If the monster's agility is higher than the player's, it will attack first, otherwise the player will. Monsters have one last data set that is used for the image displayed in battle. (KMI files). Enter the filename for each monster image. (We know we haven't created any yet, but just enter them now and remember what they are called when we do create them.) Then the final data that is placed in the game.kgi file is the starting map file (KMP). Enter the map file now and we'll create it later. Now that you've created a GAME.KGI file, you're ready to make the graphic images. Hopefully you've written down all the data on a piece of paper or you could put in a text file. Keep it handy though just in case you need to change your game.kgi. You'll also need for the monster images and the first map file too. If you need to record the data, run KGIVIEW.
|
||
|
Tiles is what makes up your game's world. Without them, your world would be simply black. If you haven't run KGIMAIN load it and select number 3) Tile Editor, or optionally run TILEDIT. Tiles are fairly easy to draw. Use arrow buttons move between colors. You can press the number of each color as a shortcut. For example you can press the 4 key and the color will be switched to color 4, red. For numbers 10 and over you press the HEX number (For 10, 11, 12; press A, B, or C) Here's a small table containing the sixteen DOS colors Color Number Hex Value Key to Press Black 0 00h 0 Dark Blue 1 01h 1 Dark Green 2 02h 2 Dark Cyan 3 03h 3 Dark Red 4 04h 4 Dark Magenta 5 05h 5 Brown 6 06h 6 Light Grey 7 07h 7 Dark Grey 8 08h 8 Light Blue 9 09h 9 Light Green 10 0Ah A Light Cyan 11 0Bh B Light Red 12 0Ch C Light Magenta 13 0Dh D Yellow 14 0Eh E White 15 0Fh F
When you are done drawing the tile press ESC and it will prompt you if you want to save it. If you type Y or Yes, it will ask whether you want to save it as a tile or sprite. Sprites can be named anything you want, but it must be called EGO.KSP if you want KGI use it. If you save a tile it will ask you if you want it to be solid or walkable. The player can walk on walkable and not on solid tiles. Unfortunately, TILEDIT cannot edit previously create tiles. When you are converting a bitmap image into a tile, you must first draw it using the sixteen color palette in your paint program. You can use the 16c_tile.bmp. When you have finished drawing your tile, use save as and save your new tile. Copy the bitmap into the bmp directory of BSVBABEL. Then start BSVBABEL. Select your bitmap containing the tile (along with any others you wish to convert.) Be sure that Screen 13h palette is set. Then convert them. Open the BSV sub-folder of BSVBABEL and copy the bsaved images into your game directory. Open up BSV2KTL and type in your bsaved image. If it fulfills the requirements of bsaved image it will prompt you if you want to save it and if you want it solid or walkable. Remember that you can create as many tiles as you want, but you can only use 10 in a game. |
||
|
To create a sprite, you do pretty much the same thing as creating a tile. Use TILEDIT or Select 3) Tile Editor from KGIMAIN. When you are drawing your sprite remember that color 0 - black is used as the transparency color. Also when saving you don't have to call your sprite EGO.KSP, but it must be called that in order for KGI to use it. When converting a bitmap to a sprite, just follow the same instructions as before, but use BSV2KSP. |
||
|
9. Creating monster images When creating monster images, you run MONEDIT or select 7) Monster Image Editor. Monster images (KMI files) are 38x48 bitmaps that are displayed on the screen to represent what the monster looks like. MONEDIT works just like TILEDIT. Be sure you have created all images for each monster and have the correct file names from when we created our GAME.KGI file. When converting a bitmap to a monster image you'll want to use 16c_mon.bmp and use BSV2KMI. |
||
|
10. Creating Tile.lst Now that we have our images for our game, We must create the tile.lst so KGI will know which tiles to use. If you still have that fake tile.lst that was created in KGIEDIT, delete it now an run KGIEDIT. Enter the names of each tile you are going to use. Remember that you can only use 10 tiles. First filename you type will be referred as tile # 1, the second being #2 and so on. You could also edit the tile.lst file in an ASCII text editor like notepad if you need any changes. |
||
|
11. Designing maps We have our game all set up now to start creating maps. Maps are 20x15 mappings made up of tiles. You can have as many maps as you want as each are loaded into the RAM as it is used. To Create our first Map, you must load MAPEDIT, or select B) Map Editor within KGIMAIN. Maps are very comprehensive compared to the other files we've used earlier. When you start it up, you'll notice that it runs in VGA SCREEN 12 (640x480x16 colors). Before you, you will see the map. Notice that it will be, by default, covered completely in whatever you chose to be the first tile. To the right of the screen, you'll see the Display Panel. Look at the picture below: Below here is the map Below here is the Display Panel
If you use the arrow keys, you'll notice that a white Square Cursor will move on the Screen. Use the + and - keys on the keyboard to switch between tiles. Beside Current tile is the current tile selected and it's number. You use the Space Bar to place tiles on the map. Pressing Enter over a tile you haven't selected will "grab" it like if you used the Color Dropper in Paint. The X and Y displays the current X and Y coordinates. Press Tab to switch to a different drawing mode. In this mode, you'll notice that the color of the cursor has switched to blue. Now when you move the cursor, it will draw the current tile over it without you needing to press Space. When you finished "drawing" your map, you're ready for other settings. Press the M key and you will be asked to type in MIDI file that will be played on the map. Note: You can use other midis for a bunch of other things other than just maps. For an example. If you specify a title.mid, it will be displayed on the title screen. These are optional though. Here's a list: Title.mid - Plays on title screen Options.mid - Plays on Option Menu Screen Battle.mid - Plays During Battle Death.mid - Plays when Player dies Press S and you will be in the string editor. Strings are messages that are displayed on the map. You can have up to 5 strings. Once in the string editor select the string you want to edit. After creating Strings you have Map Links which link other maps to the one you currently have. Press L then press The number representing which edge. 1=up 2=down 3=left 4=right After selecting the edge, select the new map, and choose whether to appear on the opposite side of the new map, or at a new X and Y coordinate. Once the Links have been created, you can add 3 Warp Points. Press W to enter the Warp Editor. Select the warp number and select the X and Y coordinate in which the player is to warp on the map. Next select the new map to warp too. Then the new X and Y coordinates when the player has warped to the new map. Warps can be used for towns, caves, castles, etc. in overworlds or stairs in dungeons. After Warps you can press # key to select the number of enemies to appear on the map. Enemies are invisible and placed randomly on the map. Once the player has reached a spot were an enemy is, a battle starts. Please note that the number of enemies that appear, do not affect which ones do appear. It only affects the probability of a battle. Obviously there should be more in dungeons and as the game progresses than there will be in the beginning to increase the game's difficulty. If you have the number of enemies set to 0, no monsters will appear nor will there be any battles. Pressing E will set the Enemy appearance. This will tell KGI on what enemies will appear on the map. Hopefully, you copied the data from the GAME.KGI file. Each monster has a number associated with it. The first enemy that you entered for an example will be Monster number 1. Press the key with the number to toggle which monster will appear or not. By default, none will appear. Be sure that if you have the number of enemies set to a number above 0, that at least one monster type will appear, otherwise errors could occur. If there are no enemies on the map, no battles will be taken place, so the enemy appearance is just ignored. Finally, pressing A will open up the Action Editor. Actions can be used for all sorts of things. Talking to people, opening a chest, reading a sign, examining a strange object, etc. You can have five actions on a map. When you select one, it will prompt you for the X and Y position of the action. The player must be in the position specified or on the tile adjacent to it. For an example, if you had (7,8) then the player could also be at 6,8; 6,7; 7,7; 8,7; 8,8; 8,0; 7,9; or 6,9. Because of this- try to keep actions at least two tiles away from each other. When the player is on one of the locations and Presses Enter, the action will be performed. After the X and Y coordinates is the String number to display. I would recommended to use each string for each action. For an example, if I had action 1, I would specify string 1 for the action. After the string number is the result type. There are six result types. Some have parameters, others don't. Of those that do, some have two while others will have only one. 0- no result. Just displays message. 1-give gold to player: Player will obtain the amount of gold specified in the next parameter. 2-full hp: Player health will be fully restored to the
maximum. 4-get item: The player will obtain the item number
specified in the first parameter. If the player already has the item, the
quantity will increase by 1. This can sometimes be a little confusing. So if you have any questions you can go to our forum: http://www.kierragames.proboards67.com When you have finished your map. You can save it by pressing F1. Then enter a file name. Maps have the extension of (KMP). If a map already exists it will confirm if you want to overwrite it. You can load a previously created map by pressing F2. To exit, Press ESC. Congratulations. You have created your first map and have completed the tutorial. Have fun creating your KGI game. |
||
|
12. Distributing Game/Engine When you have finished your game, you'll probably want to distribute it. When you do be sure to include the following files required by KGI: KGI.EXE KGI.BAT KGIXP.BAT SBMIDI.EXE SB122OLD.EXE SBSIM.COM KIERRA.MID SBSIM.CFG DRIVERS.DAT EGABIOS.KBF KGIBIOS.KBF KGIDATA.KDT All your midis, tiles, sprites, images, maps, etc. in your game. Any other files with your game. You can rename KGI.EXE to anything you want. Maybe the initials of the Game. I don't have a problem if you want to sell your game, but only with these files listed above. However, I'm not sure if this can be allowed in the GNU license, so I would recommend not to. As it says in the GNU license, you are forbidden for selling the editors along with your game. A mention of the use of KGI would be nice, but you don't need to as there is the splash screen, but try to include a link to our site. If you have any questions on distributing your game feel free to ask them on our forums. |
||
|
Special Thanks to the following people; without them KGI would not be possible. Sierra Entertainment (Sierra On-Line) for making King's Quest. Without them, I would have never wanted to program computers. Nick Sonneveld for making NAGI. It gave me the idea for what became the basis of KGI. J. B. for creating Sonic X-treme. It gave me the inspiration to create KGI when I thought QBASIC was way too limited to do anything. (I didn't know about libraries and assembly usage in QB before then) Vic's QBasic Programming Tutorials. The bitmap tutorial gave me the idea for making KGI a RPG game engine. The RPG tutorial helped me develop the map engine for the prototype; the final version map engine was based of the prototypes. The mouse tutorial was used to incorporate mouse support in some of the editors. Trelsoft Freeware for BSVBABEL. I'm sure this program will be helpful to KGI users. Tiko of BMT productions for MAKEPIC 3. The tile and monster image editors were based off it. Roto for creating the Dragon Warrior Town Editor. The map editor is based of this. Jesse Dorland for QMIDI. Thomas Laguzzi for putting QMIDI in a library. This helps games quite a bit by adding music to them. Have QMIDI as a library helped make KGI easy to manage. Creative Labs for the SBMIDI and SBSIM drivers. Without these, QMIDI couldn't have existed. And anyone else I forgot.
|
||